#ifndef _DICTIONARY_H_
#define _DICTIONARY_H_

#include <map>
using std::map;
#include <string>
using std::string;

//------------------------------------------------------------------------------

class Dictionary {
public:
  Dictionary() { ntoken = 0; }
  ~Dictionary() {}
  int createToken(const char*);
  int getToken(const char*) const;
  const char* getWord(int) const;
  void dump() const;
private:
  typedef map<string, int> DictMap;
  typedef map<int, string> TokenMap;
  int ntoken;
  DictMap dictmap;
  TokenMap tokenmap;
};

//------------------------------------------------------------------------------

#endif
